package file;

import java.io.FileWriter;
import java.io.IOException;
import java.io.Writer;

//使用Writer
public class Demo9 {
    public static void main(String[] args) throws IOException {
        try(Writer writer = new FileWriter("e:/test.txt",true)) {
            //write可以一次直接写一个字符串,比较方便
            writer.write("xixixi");

        }
    }
}
